package Leo.social.QQ;

import Leo.social.QQ.Api.ApiAdapterForQQImpl;
import Leo.social.QQ.Api.QQ;
import org.springframework.social.connect.ApiAdapter;
import org.springframework.social.connect.support.OAuth2ConnectionFactory;
import org.springframework.social.oauth2.OAuth2ServiceProvider;

public class OAuth2ConnectionFacotryForQQImpl extends OAuth2ConnectionFactory<QQ> {
    /**
     * Create a {@link OAuth2ConnectionFactory}.
     *
     * @param providerId      the provider id e.g. "facebook"
     * @param serviceProvider the ServiceProvider model for conducting the authorization flow and obtaining a native service API instance.
     * @param apiAdapter      the ApiAdapter for mapping the provider-specific service API model to the uniform {@link Connection} interface.
     */
    public OAuth2ConnectionFacotryForQQImpl(String providerId, OAuth2ServiceProvider<QQ> serviceProvider, ApiAdapter<QQ> apiAdapter) {
        super(providerId, serviceProvider, apiAdapter);
    }

    public OAuth2ConnectionFacotryForQQImpl(String providerId,String appid,String appSecret) {
        super(providerId, new OAuth2ServiceProviderForQQImpl(appid,appSecret), new ApiAdapterForQQImpl());
    }
}
